include( 'shared.lua' ) --Tell the client to load shared.lua

function set_team()
 
	Ready = vgui.Create( "DFrame" ) -- Define ready as a "DFrame"
	Ready:SetPos( ScrW() / 2, ScrH() / 2 ) -- Set the position. Half the screen height and half the screen width. This will result in being bottom right of the middle of the screen.
	Ready:SetSize( 175, 100 ) -- The size, in pixels of the Frame
	Ready:SetTitle( "Are you ready to survive?" ) -- The title; It's at the top.
	Ready:SetVisible( true ) -- Should it be seen? 
	Ready:SetDraggable( false ) -- Can people drag it around?
	Ready:ShowCloseButton( false ) -- Show the little X top right? I chose no, because I have no alterna6tive, meaning people would roam around with no weapons
	Ready:MakePopup() -- Make it popup. Of course.

	team1 = vgui.Create( "DButton", Ready ) -- Define team1 as a "DButton" with its parent the Ready frame we just created above.
	team1:SetPos( 20, 25 ) -- Set position, relative to the frame (If you didn't parent it, it would be relative to the screen
	team1:SetSize( 140, 40 ) -- How big it should be, again in pixels
	team1:SetText( "Scavanger" ) -- What should the button say? 
	team1.DoClick = function() -- ready1.doclick = function, we just defined it as a function
		sb_team1() -- When it clicks, which function does it run? sb_team1, which is defined in init.lua
		frame_close()
	end
	 
	team2 = vgui.Create( "DButton", Ready ) -- Define team2 as a "DButton" with its parent the Ready frame we just created above.
	team2:SetPos( 20, 70 ) -- Set position, relative to the frame (If you didn't parent it, it would be relative to the screen
	team2:SetSize( 140, 40 ) -- How big it should be, again in pixels
	team2:SetText( "Scout" ) -- What should the button say? 
	team2.DoClick = function() -- ready1.doclick = function, we just defined it as a function
		sb_team2() -- When it clicks, which function does it run? sb_team2, which is defined in init.lua
		frame_close()
	end 
 
end -- end the set_team function

function frame_close()
	Ready:SetVisible(false)
end